Synthetic topology of data types and classical spaces